package com.cvo.scrumtoolkit.client.entities;

import java.io.Serializable;
import java.util.Date;
import java.util.LinkedList;
import java.util.List;

import javax.persistence.Id;

import com.googlecode.objectify.annotation.Entity;
@Entity
public class Sprint implements Serializable {
	
	@Id
	private Integer sprintNummer;
	private LinkedList<BacklogItem> BacklogItems;
	private Date d;
	public Sprint (Integer nummer){
		this.sprintNummer = nummer;
		setBacklogItems(new LinkedList<BacklogItem>());
	}

	public Integer getSprintNummer() {
		return sprintNummer;
	}

	public void addBacklogItem(BacklogItem backlogItem) {
		BacklogItems.add(backlogItem);
		
	}

	public List<BacklogItem> getBacklogItems() {
		return BacklogItems;
	}

	public void setBacklogItems(LinkedList<BacklogItem> backlogItems) {
		BacklogItems = backlogItems;
	}

	@SuppressWarnings("deprecation")
	public String getD() {
		return d.getDay()+d.getMonth()+d.getYear()+"";
	}

	public void setD(Date d) {
		this.d = d;
	}

		
}
